<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-us">
<head>
	<title>SSEA report for analysis of {{ name }}</title>

	<link rel="stylesheet" href="web/gridtable.css" type="text/css" media="print, projection, screen" />
	<link rel="stylesheet" href="web/tablesorterblue.css" type="text/css" media="print, projection, screen" />
	<script type="text/javascript" src="web/jquery-latest.js"></script>
	<script type="text/javascript" src="web/jquery.tablesorter.js"></script>
	<script type="text/javascript" src="web/jquery.metadata.js"></script>	

    <script type="text/javascript" id="js">
$(document).ready(function() { 
    $("table").tablesorter({ 
        // pass the headers argument 
        headers: { 
            // disable links column and details column 
            1: { sorter: false },
            4: { sorter: false }
        }
    }); 
});
	</script>
</head>

<body>

<h1>SSEA report for analysis of {{ name }}</h1>

<table id="report" class="tablesorter" border="0" cellpadding="0" cellspacing="1">
<thead>
<tr>
<th>Index</th>
<th>Details</th>
<th>Name</th>
<th>Sample Set</th>
<th>Sample Set Description</th>
<th>Sample Set Size</th>
{% for key in params %}
    <th>Metadata: {{ key }}</th>
{% endfor %}
<th>ES</th>
<th>NES</th>
<th>NOM p-val</th>
<th>Sample Set Rank</th>
<th>Sample Set Percentile</th>
<th>Sample Set FDR q-val</th>
<th>ES Rank</th>
<th>Core hits</th>
<th>Core misses</th>
<th>Null hits</th>
<th>Null misses</th>
<th>Fisher's p-value</th>
<th>Odds ratio</th>
</tr>
</thead>

<tbody>
{% for res in results %}
<tr>
<td>{{ loop.index }}</td>
<td>
{% if 'html' in res.files %}
  <a href="{{ res.files['html'] }}">Link</a>
{% endif %}
</td>
<td>{{ res.name }}</td>
<td>{{ res.sample_set_name }}</td>
<td>{{ res.sample_set_desc }}</td>
<td>{{ res.sample_set_size }}</td>
{% for key in params %}
    <td>{% if res.params[key] != 'NA' %}{{ res.params[key] }}{% endif %}</td>
{% endfor %}
<td>{{ res.es }}</td>
<td>{{ res.nes }}</td>
<td>{{ res.nominal_p_value }}</td>
<td>{{ res.ss_rank }}</td>
<td>{{ 100.0 * res.ss_frac }}</td>
<td>{{ res.ss_fdr_q_value }}</td>
<td>{{ res.es_rank }}</td>
<td>{{ res.core_hits }}</td>
<td>{{ res.core_misses }}</td>
<td>{{ res.null_hits }}</td>
<td>{{ res.null_misses }}</td>
<td>{{ res.fisher_p_value }}</td>
<td>{{ res.odds_ratio }}</td>
</tr>
{% endfor %}
</tbody>
</table>

</body>
</html>